home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / pipe_.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  1.6 KB  |  45 lines

  1. /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: pipe_.h,v 1.2 2000/09/19 19:00:47 lpd Exp $ */
  20. /* Declaration of popen and pclose */
  21.  
  22. #ifndef pipe__INCLUDED
  23. #  define pipe__INCLUDED
  24.  
  25. #include "stdio_.h"
  26.  
  27. #ifdef __WIN32__
  28. /*
  29.  * MS Windows has popen and pclose in stdio.h, but under different names.
  30.  */
  31. #  define popen(cmd, mode) _popen(cmd, mode)
  32. #  define pclose(file) _pclose(file)
  33. #else  /* !__WIN32__ */
  34. /*
  35.  * popen isn't POSIX-standard, so we declare it here.
  36.  * Because of inconsistent (and sometimes incorrect) header files,
  37.  * we must omit the argument list.  Unfortunately, this sometimes causes
  38.  * more trouble than it cures.
  39.  */
  40. extern FILE *popen( /* P2(const char *, const char *) */ );
  41. extern int pclose(P1(FILE *));
  42. #endif /* !__WIN32__ */
  43.  
  44. #endif /* pipe__INCLUDED */
  45.